package com.lapelife.backend.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lapelife.backend.common.ResponseResult;
import com.lapelife.backend.model.domain.Post;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lapelife.backend.model.request.PostRequest;
import io.swagger.models.auth.In;
import org.springframework.transaction.annotation.Transactional;

/**
* @author Mir.Lliao
* @description 针对表【t_post(文章信息表)】的数据库操作Service
* @createDate 2023-05-05 02:07:21
*/
public interface PostService extends IService<Post> {

    ResponseResult<Integer> addPost(PostRequest postRequest);

    ResponseResult<Integer> addPostByCustom(PostRequest postRequest);

    ResponseResult<Integer> updatePost(PostRequest postRequest);

    @Transactional
    ResponseResult<Integer> deletePost(Long... id);

    ResponseResult<Page<Post>> queryPost(PostRequest postRequest);

    ResponseResult<Page<Post>> queryPostById(PostRequest postRequest);

    ResponseResult<Page<Post>> queryPostByKey(PostRequest postRequest);

}
